package com.shuai.frame.fault.tolerate.impl;

import com.shuai.frame.fault.tolerate.TolerateStrategy;
import com.shuai.frame.model.RpcResponse;

import java.util.Map;

/**
 * Fail-Fast - 容错策略
 * 快速失败 - 容错策略（立刻通知外层调用方）
 */

public class FailFastTolerantStrategy implements TolerateStrategy {

    @Override
    public RpcResponse doTolerate(Map<String, Object> context, Exception e) {
        throw new RuntimeException("服务报错", e);
    }
}